<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix= "fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
 
  <c:import url="/view/include/header.jsp"/> 
   	<div id="container_2">
    <dl class="top_img">
      <dd class="top_visuall_title">
        <p class="top_visuall_txt"><img src="/images/common/sub_titleimg_1.gif" alt="현대엘리베이터는 공정하고 투명한 기업문화 조성을 위해 상생의 경영방식을 추구합니다." width="497" height="64"/><a href="file:///C|/Users/ecg-youn/Downloads/noticeDetail.jsp"></a></p>
        <p class="top_visuall_txt_2"><img src="/images/common/sub_titleimg_2.gif" alt="" width="404" height="109"/></p>
      </dd>
    </dl>
    <div class="content"> 
      <!-- include start-->
      <c:import url="/view/include/workLeft.jsp"/>
      <!-- end-->
      <div class="sub_content">
        <dl class="ethic_title">
          <dd class="location"><img src="/images/common/home_img.gif" alt="집" width="15" height="15"/></dd>
          <dd class="location_txt">HOME > 업무지원 > 소송진행현황</dd>
        </dl>
        <dl class="img_ethic_box">
          <dd class="img_ethic"><img src="/images/work/SP_litigation_ing.gif" alt="소송진행현황" width="124" height="23"/></dd>
        </dl>
        <dl class="img_ethic_box_2">
          <!-- <dd class="img_ethic"><img src="/images/work/SP_title_9.gif" alt="현대엘리베이터 서비스 부문에 관한 업무지침서를 규정한 것입니다." width="435" height="16"/> </dd> -->
        </dl>
        <form id="boardFrm" name="boardFrm" action="/board/caseReg.hcom" method="post" enctype="multipart/form-data">
            	<input type="hidden" name="mem_no"	value="<s:property value="#session.id" />"> 
            	<input type="hidden" name="writer" value="<s:property value="#session.name" />">
            	<input type="hidden" id="save_type" name="save_type" value="case" />
            	<input type="hidden" id="mem_dept" name="mem_dept" value="${mem_dept}" />
            	<input type="hidden" id="case_seq" name="case_seq" value="${case_seq}" />
         <dl class="qna">
          <dd class="qna_box">
            <table cellspacing="0" cellpadding="0" summary="소송진행현황 목록" class="row_table_blue">
              <caption>소송진행현황 목록</caption>
              <colgroup>
                <col width="15%">
                <col width="45%" >
                <col width="15%">
                <col width="*">
              </colgroup>
              <tbody>
                        <tr>
                        	<th scope="row" >사건명</th>
                            <td class="tit">${boardView.case_name}</td>
                            <th scope="row" >프로젝트</th>
                            <td >${boardView.order_no }</td>
                        </tr>
                        <tr>
                        	<th scope="row">부서명</th>
                      		<td>${boardView.mem_dept}</td> 
                        	<th scope="row">소가</th>
                            <td>${boardView.sue_money} 원</td>
                        </tr>
                        <tr>
                        	<th scope="row">원고</th>
                      		<td class="" >${boardView.plaintiff}</td> 
                        	<th scope="row" >피고</th>
                            <td class="">${boardView.defendant}</td>
                        </tr>
                        <tr>
                        	<th scope="row" >제(피)소</th>
                      		<td>
							<s:if test="%{boardView.sue_flag == 1}">제소</s:if>
 							<s:else>피소</s:else>
							</td> 
                        	<th scope="row">상태</th>
                      		<td>
							<c:if test="${boardView.status_flag == 'P' }"><img src="/images/admin/icon_ing.gif" alt="진행" width="49" height="16"/></c:if>
							<c:if test="${boardView.status_flag == 'D' }"><img src="/images/common/btn_7.gif" alt="완료"/></c:if>
							</td> 
                        </tr>
                        <tr>
		                  <th scope="row">기타</th>
		                  <td colspan="3">${boardView.etc }</td>
		                </tr>
                    	<tr>
	                        <th scope="row">사건개요</th>
		                    <td colspan="3">${boardView.summary }</td>	
	                    </tr>                        	
					</tbody>
                 </table>
                 </form>
   	 			</dd>
   	 		</dl>
   	 		 <ul class="tab qna_box">
		       <a href="/board/caseDetail.hcom?case_seq=${case_seq}&court_step=1&mem_dept=${mem_dept}"><li class="on">제1심</li></a>
		       <a href="/board/caseDetail2.hcom?case_seq=${case_seq}&court_step=2&mem_dept=${mem_dept}"><li class="off">제2심</li></a>
		       <a href="/board/caseDetail3.hcom?case_seq=${case_seq}&court_step=3&mem_dept=${mem_dept}"><li class="off">대법원</li></a>
	        </ul>
	     <p class="align_r">
	     <a id="/admin/Printecase1.hcom?case_seq=${case_seq}&mem_dept=${mem_dept}&court_step=1" onClick="Pop_info6(this.id);" style="cursor: pointer">
	     <img src="/images/common/btn_print.gif" width="50" height="19" alt="인쇄">
	     </a>
	     </p>
	     <dl class="qna">
          <dd class="qna_box">
            <table cellspacing="0" cellpadding="0" summary="소송진행현황 상세내용" class="row_table">
              <caption>소송진행현황 상세내용</caption>
              <colgroup>
                <col width="15%">
                <col width="35%" >
                <col width="15%">
                <col width="*">
              </colgroup>
              <tbody>
                    	<tr>
                        	<th scope="row" class="table_txt_left">사건번호</th>
                            <td class="table_txt_left">${printView1.case_no}
                            </td>
                            <th scope="row" class="table_txt_left">제(피)소일</th>
                            <td colspan="3" class="table_txt_left f_blue">${fn:substring(printView1.case_date,0,4)}-${fn:substring(printView1.case_date,4,6)}-${fn:substring(printView1.case_date,6,8)}</td>
                        </tr>
                    	<tr>
                        	<th scope="row" class="table_txt_left">관할법원</th>
                            <td class="table_txt_left">${printView1.court_name}</td>
	                        <th scope="row" class="table_txt_left">재판부</th>
                      		<td class="table_txt_left" >${printView1.court_dept}</td> 
                         </tr>  
                         <tr>
                         	<th scope="row" class="table_txt_left">주심</th>
                            <td class="table_txt_left">${printView1.head_referee}</td> 
                         	<th scope="row" class="table_txt_left">종국결과</th>
                            <td class="table_txt_left">${printView1.final_status}</td> 
                         </tr> 
                         <tr>
    	                    <th scope="row" class="table_txt_left">원고대리인</th>
                            <td class="table_txt_left">${printView1.plaintiff_agent}</td> 
	                        <th scope="row" class="table_txt_left">피고대리인</th>
                           <td class="table_txt_left">${printView1.defendant_agent}
                         </tr>   
					</tbody>
                 </table>
               </form>
            </dd>
<!--         <dl class="paginate">  	
            <dd class="btn_right">
            	<input type="button" id="" value="삭제" class="input_btn_s b" />
            	<input type="button" id="btnList" value="목록" class="input_btn_s b" />
            	<input type="button" id="btnWrite" value="수정" class="input_btn_s b" />
            </dd>
        </dl>
 -->    
 		<dd class="height20"></dd>
 		<dd class="qna_box">
            <table cellspacing="0" cellpadding="0" summary="소송진행현황 주요내용" class="row_table">
                	<caption></caption>
                    	   <colgroup>
			                <col width="15%">
			                <col width="*" >
			               <%--  <col width="13%"> --%>
			                <col width="30%">
			              </colgroup>
                    <thead>
                    	<tr>
	                       	<th scope="col" class="table_th_bottom">년 월 일</th>
	                        <th scope="col" class="table_th_bottom">주요내용</th>
	                        <!-- <th scope="col" class="table_th_bottom">파일</th> -->
	                        <th scope="col" class="table_th_bottom">비고</th>
	                        <!-- <th scope="col" class="table_th_bottom">기능</th> -->
                        </tr>
                    </thead>
                    <tbody>
                    	<s:if test="%{1 > list.size()}">
                    	<tr>
                    		<td colspan="4" style="text-align:center">게시물이 없습니다.</td>
                    	<tr>
                    	</s:if>
                    	<s:iterator value="list" status="i">
						<tr>
							<td>${fn:substring(log_date,0,4)}-${fn:substring(log_date,4,6)}-${fn:substring(log_date,6,8)}</td>
							<td>${log_content }
											<c:if test="${flag == 'Y'}">
		                           			<img src="/images/admin/icon_new.gif">
		                           			</c:if>
								<c:if test="${!empty file1_name}">
								<a id="${case_seq}|${court_step}|${log_seq}|${attach1_seq}" class="fileDown" style="cursor:pointer"><img src="../../../images/common/icon_disk.png" width="13" height="13" title="${file1_name}" /></a>
								</c:if>
								<c:if test="${!empty file2_name}">
								<a id="${case_seq}|${court_step}|${log_seq}|${attach2_seq}" class="fileDown" style="cursor:pointer"><img src="../../../images/common/icon_disk.png" width="13" height="13" title="${file2_name}" /></a>
								</c:if>
								<c:if test="${!empty file3_name}">
								<a id="${case_seq}|${court_step}|${log_seq}|${attach3_seq}" class="fileDown" style="cursor:pointer"><img src="../../../images/common/icon_disk.png" width="13" height="13" title="${file3_name}" /></a>
								</c:if>
							</td>
		           			<td>${log_note }</td>	
							<!-- <td>
							수정|삭제
							</td> -->
						</tr>
						</s:iterator>
                    </tbody>
                 </table>
            <dd class="t_right">
            <img src="../../../images/common/btn_2.gif" id="btnList" width="52" height="23" alt="목록" style="cursor:pointer"/>
            </dd>
        </dl>
    </div>
   </div>
  </div>
        <!-- 오른쪽 내용 부분 -->
  <!-- footer start-->
<c:import url="/view/include/footer.jsp"/>
  <!-- end--> 
<script type="text/javascript">
$().ready(function(){		
	
	$("#btnList").click(function(){
		location.href="/board/caseList.hcom?";
	});
	
	$("#btnWrite").click(function(){
		location.href="/admin/caseupdatego.hcom?case_seq=${case_seq}";
	});
	
	$("#btnDel").click(function(){
		if(confirm("삭제하시겠습니까?")){
		location.href="/admin/caseDeletego.hcom?case_seq=${case_seq}";
		}
	});
	
	$("#btnSave").click(function(){
		if(validateCheck()){
			if(confirm("등록하시겠습니까?")){
		$("#boardFrm").attr('action','/admin/caseReg1s.hcom?').submit();
			}
		}
	});
	
});

function validateCheck(){	
	
	if($("#case_no").val() == ''){
		alert('번호를 입력해주십시요');
		$("#case_no").focus();
		return false;
	}
	if($("#case_date").val() == ''){
		alert('날짜를 입력해주십시요');
		return false;
	}	
	return true;
} 

$(".fileDown").click(function(){
	var str = $(this).attr('id');
	var array = str.split('|');
	var case_seq = $.trim(array[0]);
	var court_step = $.trim(array[1]);
	var log_seq = $.trim(array[2]);
	var attach_seq = $.trim(array[3]);
	
	location.href='/admin/fileDownloadTh.hcom?case_seq='+case_seq+'&court_step='+court_step+'&log_seq='+log_seq+'&attach_seq='+attach_seq;
});
</script>
